using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ImageCompressor
{
    internal class Localize
    {

        public static bool IsEN = CultureInfo.CurrentCulture.Name != "zh-CN";
        public static string Get(string name)
        {
            if (IsEN) return name;
            else return CN[name];
        }
        static readonly Dictionary<string, string> CN = new Dictionary<string, string>()
        {
            {"(Skiped)", "（跳过）"},
            {"_Compressed", "_压缩"},
            {"{0}min {1}s", "{0}分{1}秒"},
            {"{0}s", "{0}秒"},
            {"Cannot Create JPG Comporessor", "无法初始化JPG压缩设置"},
            {"Cannot create save folder. ", "无法创建新的储存文件夹"},
            {"Cannot delete original image:  ", "无法删除原文件： " },
            {"Compress Level (1-10)", "压缩质量（1-10）"},
            {"Compressed {0},  Skiped {1},  Failed {2},   ", "已压缩 {0}， 跳过 {1}，失败 {2}， "},
            {"Done !!!", "结束"},
            {"Done", "结束"},
            {"Drag and Drop Folders Here To Start", "将包含图像的文件夹拖入此处"},
            {"Estimate Fail", "无法估算"},
            {"Failed Images Info", "压缩图片失败"},
            {"Find {0} Imgs , Sum Size = {1}", "找到 {0} 张图片 , 总共大小 = {1}"},
            {"Image Compressor", "图像压缩工具"},
            {"Include SubFolders", "包含子文件夹"},
            {"Keep Original (Compress in new folder)", "保留源文件（储存到新文件夹）"},
            {"Max Pixel Limit", "像素限制"},
            {"Missing", "丢失"},
            {"New Image Size Estimate:  ", "压缩前后大小估计： "},
            {"No Folders Droped", "没有找到拖入的文件夹"},
            {"No Images (JPG, PNG, BMP) Found in Folder Droped", "拖入文件夹内没有发现图像 (JPG, PNG, BMP)"},
            {"Paused, Click to Continue", "压缩暂停，单机继续"},
            {"Read file error at ", "打开图像失败："},
            {"Read file missing", "读取文件丢失"},
            {"Read file not exist. ", "要读取的图像不存在"},
            {"Read image larger than 256 MB", "不能处理大于256MB的图片"},
            {"Ready", "单击开始压缩"},
            {"Run", "压缩中"},
            {"Running, Click to Pause", "压缩中，单击以暂停"},
            {"Running, Wait to Pause", "结束压缩中，马上暂停"},
            {"Save file error at ", "储存图像失败："},
            {"Save file is occupied. ", "要保存的图像被其他程序占用"},
            {"Save file is ReadOnly. ", "要保存的图像是只读的"},
            {"Skip File Size (KB)", "跳过小图片（KB）"},
            {"Time {0}, Compressed Result {1} / {2}", "耗时 {0}, 压缩前后总大小 {1} / {2}"},
            {"Waiting for image folders", "等待拖入图片文件夹"},
            {"Warning", "警告"},
        };
    }
}
